package MicroSpring.beanPostProcessor;

/*
    处理依赖注入的bean后处理器
 */
public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor{
    /*
        实例化之前执行，这里返回的对象会替换原本的bean
     */
    default Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName){return null;}

    /*
        实例化之后执行，这里返回false会跳过依赖注入阶段
     */
    default boolean postProcessAfterInstantiation(Object bean, String beanName){return true;}

    /*
        依赖注入阶段执行，如@Autowired,@Vlue,@Resource
     */
    default void postProcessProperties( Object bean, String beanName){}


}
